//
//  ReportDataTableViewCell.m
//  兼职页面
//
//  Created by kuiyuan liang on 2021/5/23.
//

#import "ReportDataTableViewCell.h"
#import "ZooDataView.h"
#import "CommonUtil.h"

@interface ReportDataTableViewCell()
@property (strong, nonatomic) UIScrollView * scrollerView;
@end

@implementation ReportDataTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
       
        
        for (NSInteger i = 0; i < 8; i ++) {
        
            CGFloat w = AD(50);
            ZooDataView *zoo = [[ZooDataView alloc] initWithFrame:CGRectMake(i * w, 0, w, AD(160))];
            [zoo refreshData:@"1尾"];
            [self.scrollerView addSubview:zoo];
            [self.contentView addSubview:self.scrollerView];
            self.scrollerView.contentSize = CGSizeMake(8 * w, 0);
        }
        
        
    }
    return self;
}

-(void)layoutSubviews{
    [super layoutSubviews];
    self.scrollerView.width = self.width;
}


-(UIScrollView *)scrollerView{
    if (!_scrollerView) {
        _scrollerView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 0, AD(160))];
    }
    return _scrollerView;
}

@end
